<template>
	<div>
		<!--详情界面-->
		<el-dialog title="特约详情" :visible.sync="dialogVisible" size="small" :close-on-press-escape="false" :before-close="off" :top="dialog_margin_top">
			  <el-form label-width="160px" >
			  <el-row :span="24">
			  	<el-col :span="12">
			  		<el-form-item label="特约代码" required>
						<el-input v-model="formData.clausecode" size="small" readonly></el-input>
					</el-form-item>
					<el-form-item label="特约名称" required>
						<el-input v-model="formData.clausename" size="small" readonly></el-input>
					</el-form-item>
					<el-form-item label="语种" required>
						<el-select v-model="formData.language" size="small" disabled>
							<el-option v-for="item in languageOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="有效标识" required>
						<el-select v-model="formData.validstatus" size="small" disabled>
							<el-option v-for="item in validOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="适用险种" required>
						<el-input v-model="riskCodesLabel" size="small" placeholder="适用险种代码" readonly></el-input>
					</el-form-item>
					<el-form-item label="适用默认带出险种">
						<el-input v-model="defaultRiskLabel" size="small" placeholder="默认带出险种" readonly></el-input>
					</el-form-item>
					<el-form-item label="适用默认带出险种方案">
						<el-input v-model="planLabel" size="small" placeholder="适用计划代码" readonly></el-input>
					</el-form-item>
			  	</el-col>
			  	<el-col :span="12">
					<el-form-item label="适用分公司" required>
						<el-input v-model="comLabel" size="small" placeholder="适用分公司" readonly></el-input>
					</el-form-item>
					<el-form-item label="适用默认带出分公司">
						<el-input v-model="defaultComLabel" size="small" placeholder="默认带出分公司" readonly></el-input>
					</el-form-item>
					<el-form-item label="适用代理人">
						<el-input v-model="agentLabel" size="small" placeholder="适用代理人" readonly></el-input>
					</el-form-item>
					<el-form-item label="内容是否可修改标志位">
						<el-select v-model="formData.contflag" size="small" disabled>
							<el-option v-for="item in contflagOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="是否可删除标志位">
						<el-select v-model="formData.delflag" size="small" disabled>
							<el-option v-for="item in delflagOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="初始化默认带出标志位">
						<el-select v-model="formData.iniflag" size="small" disabled>
							<el-option v-for="item in iniflagOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
						</el-select>
					</el-form-item>
			  	</el-col>
			  	<el-col :span="24">
				  	<el-form-item label="特约内容">
						<el-input type="textarea" v-model="formData.context" size="small" readonly></el-input>
					</el-form-item>
			  	</el-col>
			  	<el-col :span="24">
				  	<el-form-item label="审核人备注">
						<el-input type="textarea" v-model="formData.remark" size="small" readonly></el-input>
					</el-form-item>
			  	</el-col>
			  </el-row>
			</el-form>
			  <span slot="footer" class="dialog-footer">
				   <el-button @click="off">关 闭</el-button>
			  </span>
		</el-dialog>

	</div>
</template>

<script>

import ClauseAPI from "../../../../js/production/clause/clauseAPI"

  export default {
	components : {
 	 },
	data() {
		return {
			dialogVisible: true,
			formData: {
			    //prpdclause表
			    clausecode : '',
			    clausename : '',
			    language : '',
			    titleflag : '',
			    lineno : '',
			    context : '',
			    newclausecode : '',
			    validstatus : '',
			    flag : '',
			    comcode : '',
			    contflag : '',
			    delflag : '',
			    iniflag : '',
			    remark : '',
			    agentcode : '',

			    //prpdcoderisk表
			    riskcode: '',

			    //prpdriskclause表
			    defaultriskcode: '',
			    plancode: '',
			    defaultcomcode: '',

			},
			riskCodesLabel : '',
			defaultRiskLabel : '',
			planLabel : '',
			comLabel : '',
			defaultComLabel : '',
			agentLabel : '',
			dialog_margin_top : '2%',
			languageOptions: [
				{label : 'C-中文',value: 'C'},
				{label : 'E-英文',value: 'E'}
			],
			validOptions: [
				{label : '1-有效',value: '1'},
				{label : '0-无效',value: '0'}
			],
			contflagOptions: [
				{label : '1-内容不可修改',value: '1'},
				{label : '0-内容可修改',value: '0'}
			],
			delflagOptions: [
				{label : '1-不可删除',value: '1'},
				{label : '0-可删除',value: '0'}
			],
			iniflagOptions: [
				{label : '1-初始化不默认带出',value: '1'},
				{label : '0-初始化默认带出',value: '0'}
			],
		}
	},
	mounted() {
		let temp = Object.assign({}, this.$parent.rowDetail);
		this.formData= temp;
		ClauseAPI.queryCodeRiskByClause(this);
		this.agentLabel = temp.agentcode;
		this.comLabel = temp.comcode;
	},
	methods: {
		off() {
			this.$parent.showDetailDialog = false;
		},
	}
  }
</script>